package com.donzell.joinmodel;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateHelper {
	public static Date parseString(String s, String format)  {
		if (format == null)
			format = "yyyy-MM-dd HH:mm:ss";
		SimpleDateFormat df = new SimpleDateFormat(format);
		try {
			return df.parse(s);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return null;
	}
}
